# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lfi-fuzzploit
pkgver=1.1
pkgrel=6
groups=('blackarch' 'blackarch-webapp' 'blackarch-fuzzer'
        'blackarch-exploitation')
pkgdesc='A simple tool to help in the fuzzing for, finding, and exploiting of local file inclusion vulnerabilities in Linux-based PHP applications.'
arch=('any')
url='http://packetstormsecurity.com/files/106912/LFI-Fuzzploit-Tool-1.1.html'
license=('GPL3')
depends=('python2')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/LFI_fuzzploit-$pkgver.tar.gz"
        'lfi-fuzzploit.patch')
sha512sums=('ee6e82f610a5a921e7128d5d831d3daaf34c07d3629b37717be5454196ccaae2a89ea56fc994338685bc27ea131207da9b503d2c58cd6834e93ff6fe058828de'
            '329723052f70909a18a83ed177977fb1cf0bcceb6770cf036ea6636a05a3f8e4e318cf5fed29b41783fdc81c6573da3aac37942bac1c1a157791d172bdc6582d')

prepare() {
  cd LFI_fuzzploit

  sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' lfi_fuzzploit

  patch -p2 < ../lfi-fuzzploit.patch
}

package() {
  cd LFI_fuzzploit

  install -Dm 755 lfi_fuzzploit "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" changelog
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

